package com.etc;

/**
 * 子弹
 */
public class Bullet extends FlyingObject {

    //子弹步数
    private int speed = 3;

    //构造方法
    public Bullet(int x,int y) {
        image = AircraftwarGame.bullet;
        width = image.getWidth();
        height = image.getHeight();
        this.x = x;
        this.y = y;
    }

    @Override
    public void step() {
        y-=speed;
    }

    @Override
    public boolean outBounds() {
        if(this.y < 0) {
            return true;
        }
        return false;
    }
}
